package com.sdx.console.enrolledData.service;

import java.util.List;
import java.util.Map;

import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.entity.CoreOrg;
import com.sdx.console.common.entity.BaseProvince;
import com.sdx.console.plan.entity.TDPlanningData;
import org.beetl.sql.core.engine.PageQuery;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ibeetl.admin.core.util.PlatformException;

import com.sdx.console.enrolledData.dao.TDEnrolledDataDao;
import com.sdx.console.enrolledData.entity.TDEnrolledData;
import com.ibeetl.admin.core.service.BaseService;

/**
 * 录取数据 Service
 */

@Service
@Transactional
public class TDEnrolledDataService extends BaseService<TDEnrolledData>{

    @Resource
	private TDEnrolledDataDao tDEnrolledDataDao;

    public PageQuery<TDEnrolledData>queryByCondition(PageQuery query){
        PageQuery ret =  tDEnrolledDataDao.queryByCondition(query);
        queryListAfter(ret.getList());
        return ret;
    }

    public void batchDelTDEnrolledData1(List<String> ids){
        try {
            tDEnrolledDataDao.batchDelTDEnrolledData1ByIds(ids);
        } catch (Exception e) {
            throw new PlatformException("批量删除录取数据失败", e);
        }
    }

    public List<BaseProvince> selectProv(Integer provinceId){
        return tDEnrolledDataDao.selectProv(provinceId);
    }

    public CoreOrg selectCoreOrg(Integer id){
        return tDEnrolledDataDao.selectCoreOrg(id);
    }

	public List<TDEnrolledData> all() {
		return tDEnrolledDataDao.all();
		}

    public List<BaseEntity> selectBatch(Map<String, Object> map) {
        return tDEnrolledDataDao.selectBatch(map);
    }

    public TDEnrolledData queryEnrolledDateById(Integer id,Integer provinceId){
        return tDEnrolledDataDao.queryEnrolledDateById(id, provinceId);
    }

    public void insertData(TDEnrolledData tDEnrolledData) {
        tDEnrolledDataDao.insertData(tDEnrolledData);
    }

    public void updateData(TDEnrolledData tDEnrolledData) {
        tDEnrolledDataDao.updateData(tDEnrolledData);
    }
}
